source('pop.sim.fn.r')
years <- 1920:1959
source('sa.dat.fn.r')
y <- sa.dat.fn(years = years, F = 0.9, sel.fn = logistic.sel.fn, pulse = TRUE)

write.csv(y$survey.raw, file = 'survey.dat.pulse.csv')
write.csv(y$saa, file = 'saa.pulse.csv')
write.csv(y$catch.raw, file = 'catch.dat.pulse.csv')
write.csv(y$caa, file = 'caa.pulse.csv')

y <- sa.dat.fn(years = years, F = 0.9, sel.fn = logistic.sel.fn, samp.prob.c = 0.01, samp.prob.s = 0.1, pulse = TRUE)
write.csv(y$survey.raw, file = 'survey.dat.sampled.pulse.csv')
write.csv(cbind(y$survey.y, y$saa), file = 'saa.sampled.pulse.csv')
write.csv(y$catch.raw, file = 'catch.dat.sampled.pulse.csv')
write.csv(cbind(y$catch.y, y$caa), file = 'caa.sampled.pulse.csv')
